package com.mapper;

import com.pojo.LunBo_db;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface LunBoMapper_db {

    List<LunBo_db> list(Integer del);

    @Select("select * from lunbo_db where l_del = 1")
    List<LunBo_db> listAll();

    @Select("select * from lunbo_db where l_id = #{lId}")
    LunBo_db findById(Integer lId);
    

    @Select("select * from lunbo_db where l_del = #{del}")
    List<LunBo_db> findByDel(Integer del);

    @Insert("insert into lunbo_db(l_photo,l_del) values (#{photo},#{del})")
    Integer add(@Param("photo") String photo,@Param("del") Integer del);

    @Update("update lunbo_db set l_photo = #{lPhoto},l_del = #{lDel} where l_id = #{lId}")
    Integer update(LunBo_db lunBoDb);

    @Delete("delete from lunbo_db where l_id = #{lId}")
    Integer del(Integer lId);
}
